package cn.wolfcode.luowowo.article.mapper;

import cn.wolfcode.luowowo.article.domain.StrategyDetail;
import cn.wolfcode.luowowo.common.query.StrategyQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StrategyDetailMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StrategyDetail record);

    StrategyDetail selectByPrimaryKey(Long id);

    List<StrategyDetail> selectAll();

    List<StrategyDetail> query4List(StrategyQuery qo);

    int updateByPrimaryKey(StrategyDetail record);

    void deleteRelation(Long detailId);

    List<StrategyDetail> selectByCatalogId(Long id);

    List<StrategyDetail> selectViewNumTop3(Long destId);

    List<StrategyDetail> selectByDestIdTop3(Long id);

    void updateStats(StrategyDetail detail);

    void insertUserRelation(@Param("favorId") Long favorId, @Param("userId") Long userId);

    List<Long> selectByUserId(Long userId);

    List<StrategyDetail> selectAllByUserId(Long userId);

    void deleteRelationByUserId(Long id);
}